package com.spzx.channel.controller;

import com.spzx.channel.service.ICategoryService;
import com.spzx.channel.service.IIndexService;
import com.spzx.common.core.domain.R;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import com.spzx.common.security.annotation.InnerAuth;
import com.spzx.product.api.domain.vo.CategoryVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
@Slf4j
@Tag(name = "首页管理")
@RestController
@RequestMapping(value = "/index")
@SuppressWarnings({"unchecked", "rawtypes"})
public class IndexController extends BaseController {
    @Resource
    IIndexService indexService;


    @Operation(summary = "获取首页数据")
    @GetMapping
    public AjaxResult index(){
        Map<String,Object> map= indexService.getIndexData();
        return success(map);
    }



}
